package com.example.transformer.repository;

import com.example.transformer.entity.ScanTask;  // 确保导入正确
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface ScanTaskRepository extends JpaRepository<ScanTask, Long> {
    List<ScanTask> findByStatusOrderByCreatedAtDesc(String status);
    Optional<ScanTask> findFirstByFileNameOrderByCreatedAtDesc(String fileName);
}